
#ifndef QOPENCVWIDGET_H
#define QOPENCVWIDGET_H

#include <opencv/cv.h>
#include <QPixmap>
#include <QLabel>
#include <QWidget>
#include <QVBoxLayout>
#include <QImage>
#include <QThread>


class QOpenCVWidget : public QWidget
{
Q_OBJECT

private:
    QLabel *imagelabel;
    QVBoxLayout *layout;
    
    QImage image;
    
public:
    QOpenCVWidget(QWidget *parent = 0);
    ~QOpenCVWidget(void);
    void putImage(IplImage *);
    static bool toQImage(QImage &image, IplImage *cvimage);
}; 

class CvCameraThread : public QThread
 {
    Q_OBJECT

protected:
    CvCapture *m_pcvCamera;

public:
    void run();
 };

#endif
